﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class OrderItemInfoConfig : EntityTypeConfiguration<OrderItemInfo>
    {
        public OrderItemInfoConfig()
        {
            ToTable("Himall_OrderItems");
            Property(item => item.SKU).HasColumnType("varchar").HasMaxLength(200);
            Property(item => item.SkuId).HasColumnType("varchar").HasMaxLength(200);
            Property(item => item.ProductName).HasColumnType("varchar").HasMaxLength(200);
            Property(item => item.Color).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.Size).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.Version).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.ThumbnailsUrl).HasColumnType("varchar").HasMaxLength(200);
         
            HasRequired(x => x.OrderInfo).WithMany(x => x.OrderItemInfo).HasForeignKey(x => x.OrderId);
        }
    }
}
